package view;

import common.NowUser;
import javafx.application.Application;
import javafx.stage.Stage;
import view.Login;

import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.net.Socket;

public class View extends Application {
    private static Socket socket;

    @Override
    public void start(Stage primaryStage) throws Exception {
        new Login().start(primaryStage);
    }

    public static void main(String[] args) throws IOException {
        socket = new Socket("127.0.0.1",9999);
        NowUser.setSocket(socket);
        NowUser.oos = new ObjectOutputStream(socket.getOutputStream());
        NowUser.ois = new ObjectInputStream(socket.getInputStream());
        launch(args);
    }
}
